(function (line) {
    line.extend(line, {
        /**
         * Format the data to the correct style
         * @param {Date} date
         * @param {String} format
         * @return {String}
         */
        formatDate:function (date, format) {
            var week = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'];
            var selector = {
                'yyyy':date.getFullYear(),
                'yy':date.getFullYear().toString().slice(2),
                'mm':date.getMonth(),
                'dd':date.getDate(),
                'hh':date.getHours(),
                'min':line.padLeft(date.getMinutes().toString(), 2, '0'),
                'ss':line.padLeft(date.getSeconds().toString(), 2, '0'),
                'week':week[date.getDay()]
            };
            return format.replace(/yyyy|yy|mm|dd|hh|min|ss|week/g, function (key) {
                return selector[key];
            });
        },
        /**
         * Get the current timestamp
         * @return {Number}
         */
        now:Date.now || function(){
            return +new Date;
        }
    });
})(line);